package cn.flant.cmd;

import cn.flant.io.tcp.SocketHandler;

public interface Filter {

	public void onConnected(SocketHandler socketHandler) throws Exception;

	/**
	 * 
	 * @param request
	 * @param response
	 * @return if true continue else break;
	 * @throws Exception
	 */
	public boolean preExecute(Request request, Response response) throws Exception;

	public void onClosed(SocketHandler socketHandler) throws Exception;

	public void destroy();
}
